package com.shuogesha.platform.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.shuogesha.common.util.JsonResult;
import com.shuogesha.common.web.mongo.Pagination;
import com.shuogesha.platform.entity.Authentication;
import com.shuogesha.platform.exception.BadCredentialsException;
import com.shuogesha.platform.exception.UsernameNotFoundException;

public interface AuthenticationService {
	
	
	Pagination getPage(String name, int pageNo, int pageSize);

	Authentication findById(String id);

	void save(Authentication bean);

	void update(Authentication bean);

	void removeById(String id);
	
	void removeByIds(String[] ids); 
	
	JsonResult login(String username, String password, String ip,
			HttpServletRequest request, HttpServletResponse response);

	Authentication retrieve(String authId);
}